<template>
    <div>
        <h3>门店统计列表</h3>
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <td>Id</td>
                    <td>会员名称</td>
                    <td>会员手机号</td>
                    <td>门店名称</td>
                    <td>应支付金额</td>
                    <td>实际支付金额</td>
                    <td>支付时间</td>
                    <td>操作</td>
                </tr>

                <tr v-for="item in data.list">
                    <td>{{item.Id}}</td>
                    <td>{{item.UserName}}</td>
                    <td>{{item.Phone}}</td>
                    <td>{{item.ShopName}}</td>
                    <td>{{item.Money}}</td>
                    <td>{{item.Pay}}</td>
                    <td>{{moment(item.PayTime).format("YYYY-MM-DD HH:mm:ss") }}</td>
                    <td>
                        <input type="button" class="btn btn-info" value="详情">
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import{ref,reactive,onMounted} from 'vue'
import {useRouter,useRoute} from 'vue-router'
import axios from 'axios';
import moment from 'moment';
const router=useRouter();
const route=useRoute();

onMounted(()=>{
    getlist();
})

let quertInfo=reactive({
    shopId:'',
})
let data:any=reactive({
    list:[]
})
//获取门店统计列表
const getlist=()=>{
    axios({
        method:'get',
        url:'/api/Shop/GetShopCountList',
        params:quertInfo.shopId,
    })
    .then(res=>{
        console.log(res);
        data.list=res.data
        
    })
    .catch(err=>{
        console.log(err);
    })
}

</script>

<style scoped>

</style>